home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_tem_ambbatiki2.cog < prev    next >
Text File  |  1999-11-15  |  3KB  |  107 lines

  1. # Jones 3D Cog Script
  2. #
  3. # TEM_AmbBATiki2.cog
  4. #
  5. # [TRM]
  6. #
  7. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  8. # ========================================================================================
  9.  
  10. symbols
  11.  
  12.     message        entered
  13.     message     pulse
  14.  
  15.     thing       player          local
  16.     
  17.     thing        soundPos0        nolink
  18.     thing        soundPos1        nolink
  19.     thing        soundPos2        nolink
  20.     thing        soundPos3        nolink
  21.     thing        soundPos4        nolink
  22.     thing        soundPos5        nolink
  23.     thing        soundPos6        nolink
  24.     thing        soundPos7        nolink
  25.     
  26.     sector      start_Amb1      linkID=1
  27.     sector      start_Amb2      linkID=1
  28.     sector      start_Amb3      linkID=1
  29.     
  30.     sector      stop_Amb1       linkID=0
  31.     sector      stop_Amb2       linkID=0
  32.     sector      stop_Amb3       linkID=0
  33.  
  34.     sound        ambient0=tem_wind01_c.wav   local
  35.     sound        ambient1=tem_wind02_c.wav   local
  36.     sound        ambient2=tem_wind03_c.wav   local
  37.     sound        ambient3=tem_wind04_c.wav   local
  38.     sound        ambient4=tem_wind05_c.wav   local
  39.     
  40.     sound       animals0=gen_canyon_a2.wav      local
  41.     sound       animals1=olv_outside_a01.wav    local
  42.     sound       animals2=olv_outside_a02.wav    local
  43.     sound       animals3=olv_outside_a03.wav    local
  44.     sound       animals4=olv_outside_a08.wav    local
  45.     sound       animals5=olv_outside_a04.wav    local
  46.     sound       animals6=olv_outside_a06.wav    local
  47.     
  48.     int         randNum     local
  49.     int         soundsOn=0  local
  50.     
  51. end
  52.  
  53. # ========================================================================================
  54.  
  55. code
  56.  
  57. entered:
  58.  
  59.     player = GetLocalPlayerThing();
  60.  
  61.     if((GetSenderID() == 1) && (soundsOn == 0))
  62.     {
  63.         soundsOn = 1;
  64.         SetPulse(2.0);
  65.     }
  66.     
  67.     if(GetSenderID() == 0)
  68.     {
  69.         soundsOn = 0;
  70.         SetPulse(0.0);
  71.     }
  72.     
  73.     return;
  74.  
  75. # ========================================================================================
  76.  
  77. pulse:
  78.  
  79.     randNum = RandBetween(1, 2);
  80.     
  81.     if((GetMoveStatus(player) == 12) && (GetPhysicsFlags(player) != 0x00100000))
  82.     {
  83.         Print("under water");
  84.         PlaySoundThing(ambient0[RandBetween(0, 4)], soundPos0[RandBetween(0, 7)], 0.25, -1, -1, 0);
  85.         
  86.         if(randNum == 1)
  87.         {
  88.             PlaySoundThing(animals0[RandBetween(0, 6)], soundPos0[RandBetween(0, 6)], 0.25, 10, 30, 0);
  89.         }
  90.     }
  91.     
  92.     else
  93.     {
  94.         PlaySoundThing(ambient0[RandBetween(0, 4)], soundPos0[RandBetween(0, 7)], 1.0, -1, -1, 0);
  95.         
  96.         if(randNum == 1)
  97.         {
  98.             PlaySoundThing(animals0[RandBetween(0, 6)], soundPos0[RandBetween(0, 6)], 1.0, 10, 30, 0);
  99.         }
  100.     }
  101.     
  102.     return;
  103.  
  104. # ========================================================================================
  105.  
  106. end
  107.